const { logger } = require('ee-core/log')
const {emailService} = require("../service/emailService");


/**
 * @class EmailController
 * @description 邮件服务控制器
 * */
class EmailController {
    getEmailList(args,event){
        let { type,content,page,pageSize } = args
        // console.log(type,content,page,pageSize)
        let result = emailService.getEmailList(type,content,event,page,pageSize)
        return result
    }

    async switchUserAccount(args){
        let { platfrom } = args
        let result = await emailService.switchUserAccount(platfrom)
        return result
    }

    /**
     * 创建写邮件的窗口
     * */
    createWriteEmailWin(){
        let result = emailService.createWriteEmailWin()
        return result
    }
}

EmailController.toString = () => '[class EmailController]';

module.exports = EmailController